namespace SimpleWebServices.Web
{
    using System;
    using SimpleWebServices;
    using Xunit;

    public sealed class RedirectionFacts
    {
        [Fact]
        public void typedef()
        {
            Assert.True(new ObjectExpectations<Redirection>()
                .DerivesFrom<Resource>()
                .IsAbstractBaseClass()
                .Implements<IRedirect>()
                .Result);
        }

        [Fact]
        public void ctor()
        {
            Assert.NotNull(new TestRedirection() as Redirection);
        }

        [Fact]
        public void op_ToActionResult()
        {
            Assert.Throws<NotSupportedException>(() => (new TestRedirection() as Redirection).ToActionResult());
        }
    }
}